#pragma once
#include<string>
#include<unordered_map>
#include<functional>
#include<sstream>
#include<memory>
#include"Req.h"
#include<atomic>

class DealReq{
 public:
  static void dealReq(int fd);
  static void readData(int fd);
  static void dealFunc(int fd);
  static void addReq(int fd);
  static void eraseReq(int fd);
  static std::shared_ptr<Req> getReq(int fd);
  static std::unordered_map<std::string, std::function<std::string(int)>> UTF;
  static std::unordered_map<int, std::shared_ptr<Req>> STS;
  static std::atomic_flag lock_sts;
  static const int size = 4096;
};
